Boost
boost
arrow_drop_down
Boost.Test
C++ 11 Added in Boost 1.29.0
Categories: Correctness

Support for simple program testing, full unit testing, and for program execution monitoring.

This Release

Gennadiy Rozental
Gennadiy Rozental
Maintainer
Raffi Enficiaud
Raffi Enficiaud
Maintainer
Matt Borland
Matt Borland
Maintainer
Keerthi Timmaraju
Contributor - New
Rene Rivera
Rene Rivera
Contributor

boosttest logo

What is Boost.Test?

Boost.Test is a C++11/14/17 unit testing library, available on a wide range of platforms and compilers.

The library is part of Boost. The latest release of the library is available from the boost web site.

Full instructions for use of this library can be accessed from http://www.boost.org/doc/libs/release/libs/test/

Key features

  • Easy to get started with:
    1. download and deflate the latest boost archive
    2. create a test module with this (header version):
      #define BOOST_TEST_MODULE your_test_module
      #include <boost/test/included/unit_test.hpp>
      
    3. Write your first test case:
      BOOST_AUTO_TEST_CASE( your_test_case ) {
          std::vector<int> a{1, 2};
          std::vector<int> b{1, 2};
          BOOST_TEST( a == b );
      }
      
    4. build and run
    5. done
  • powerful and unique test assertion macro BOOST_TEST, that understands floating points, collections, strings... and uses appropriate comparison paradigm
  • self-registering test cases, organize cases in test suites, apply fixtures on test cases, suites or globally
  • provide assertion context for advanced diagnostic on failure
  • powerful and extensible dataset tests
  • add decoration to test cases and suites for advanced description, group/label, and dependencies
  • powerful command line options and test case filters
  • extensible logging, XML and JUNIT outputs for third-party tools (eg. cont. integration)
  • various usage (shared/static library/header only) for faster integration and/or compilation/build cycles, smaller binaries

Copyright and license

Copyright 2001-2014, Gennadiy Rozental.
Copyright 2013-2020, Boost.Test team.

Distributed under the Boost Software License, Version 1.0.
(Get a copy at www.boost.org/LICENSE_1_0.txt)

Contribute

Please read this document to get started.

Build Status

Boost.Test uses mostly the facility provided by our wonderful Boost testers (column Tests below).

Branch Deps Docs Tests Github Actions
master Deps Documentation Enter the Matrix Build Status
develop Deps Documentation Enter the Matrix Build Status

All Time

Raffi Enficiaud
Raffi Enficiaud
Contributor
Raffi Enficiaud
Raffi Enficiaud
Contributor
Raffi Enficiaud
Raffi Enficiaud
Contributor
Andrzej Krzemieński
Andrzej Krzemieński
Contributor
Raffi Enficiaud
Raffi Enficiaud
Contributor
Beman Dawes
Beman Dawes
Contributor
Steven Watanabe
Steven Watanabe
Contributor
John Maddock
John Maddock
Contributor
Jürgen Hunold
Jürgen Hunold
Contributor
Vladimir Prus
Vladimir Prus
Contributor
Douglas Gregor
Douglas Gregor
Contributor
nobody
Contributor
jamie
Contributor
Marshall Clow
Marshall Clow
Contributor
Peter Dimov
Peter Dimov
Contributor
Adam Wulkiewicz
Adam Wulkiewicz
Contributor
Andrey Semashev
Andrey Semashev
Contributor
K. Noel Belcourt
K. Noel Belcourt
Contributor
Dave Abrahams
Dave Abrahams
Contributor
Antony Polukhin
Antony Polukhin
Contributor
Troy D. Straszheim
Troy D. Straszheim
Contributor
Markus Schöpflin
Contributor
David Deakins
David Deakins
Contributor
Roland Schwarz
Roland Schwarz
Contributor
Victor A. Wagner Jr.
Contributor
Daniel James
Daniel James
Contributor
Bryce Adelstein-Lelbach
Bryce Adelstein-Lelbach
Contributor
James E. King III
James E. King III
Contributor
akumta
akumta
Contributor
Eric Niebler
Contributor
Marcel Raad
Marcel Raad
Contributor
Jens Maurer
Jens Maurer
Contributor
Jeremiah Willcock
Jeremiah Willcock
Contributor
Paul A. Bristow
Paul A. Bristow
Contributor
Vicente J. Botet Escriba
Vicente J. Botet Escriba
Contributor
Edward Diener
Edward Diener
Contributor
Marek Kurdej
Marek Kurdej
Contributor
Aleksey Gurtovoy
Contributor
Jonathan Turkanis
Jonathan Turkanis
Contributor
Joaquín M. López Muñoz
Joaquín M. López Muñoz
Contributor
Ed Catmur
Ed Catmur
Contributor
Ed Catmur
Ed Catmur
Contributor
Boris Gubenko
Contributor
Toon Knapen
Toon Knapen
Contributor
Mateusz Łoskot
Mateusz Łoskot
Contributor
Norbert Wenzel
Norbert Wenzel
Contributor
Gennaro Prota
Contributor
Jonathan Wakely
Jonathan Wakely
Contributor
Benjamin Roland Buch
Benjamin Roland Buch
Contributor
Edward Diener
Edward Diener
Contributor
Stephen Kelly
Stephen Kelly
Contributor
BenWiederhake
BenWiederhake
Contributor
Noel Belcourt
Noel Belcourt
Contributor
Romain Geissler
Romain Geissler
Contributor
Aaron Gorenstein
Aaron Gorenstein
Contributor
Gabriel Hege
Gabriel Hege
Contributor
zerotypos-found
zerotypos-found
Contributor
Tim Blechmann
Tim Blechmann
Contributor
Brian Kuhl
Brian Kuhl
Contributor
Marek Kurdej
Marek Kurdej
Contributor
Bevan Collins
Bevan Collins
Contributor
Ben Wiederhake
Ben Wiederhake
Contributor
George Koehler
George Koehler
Contributor
Mikhail Strelnikov
Mikhail Strelnikov
Contributor
Jan Bouwer
Jan Bouwer
Contributor
equal-l2
equal-l2
Contributor
Tom Hughes
Tom Hughes
Contributor
Reimar Döffinger
Reimar Döffinger
Contributor
Laurent Stacul
Contributor
Peter Klotz
Peter Klotz
Contributor
Daniela Engert
Daniela Engert
Contributor
Michael A. Jackson
Michael A. Jackson
Contributor
ja11sop
ja11sop
Contributor
Daniel Laügt
Daniel Laügt
Contributor
Jörg Böhme
Jörg Böhme
Contributor
wwinder
wwinder
Contributor
Jörg Krause
Jörg Krause
Contributor
André Draszik
André Draszik
Contributor
Adam Majer
Adam Majer
Contributor
Jonnahtan Saltarin
Contributor
Namezero
Namezero
Contributor
nk
nk
Contributor
Nathan Toone
Nathan Toone
Contributor
Juan Alday
Contributor
Rainer Deyke
Rainer Deyke
Contributor
Tien Do
Tien Do
Contributor
Peter Jansson
Peter Jansson
Contributor
Luke Peterson
Luke Peterson
Contributor
Kedar R. Bhat
Kedar R. Bhat
Contributor
Mikhail Pilin
Mikhail Pilin
Contributor
Alexander Grund
Alexander Grund
Contributor
mmitti
mmitti
Contributor
Hartmut Kaiser
Hartmut Kaiser
Contributor
Partha P. Mukherjee
Partha P. Mukherjee
Contributor
Andrey Semashev
Andrey Semashev
Contributor
Jurko Gospodnetić
Jurko Gospodnetić
Contributor
Peter Dimov
Peter Dimov
Contributor
Eugene Zelenko
Contributor
Vladimir Prus
Vladimir Prus
Contributor
Pino Toscano
Pino Toscano
Contributor
Jessica Hamilton
Jessica Hamilton
Contributor
Jere Pehkonen
Jere Pehkonen
Contributor
Giovanni Mascellani
Giovanni Mascellani
Contributor
Ralf W. Grosse-Kunstleve
Contributor